﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%
    String TAB_ON_CLASS = "tabOn";
    String TAB_OFF_CLASS = "tabOff";
    String streamTabClass = TAB_OFF_CLASS, photosTabClass = TAB_OFF_CLASS, friendsTabClass = TAB_OFF_CLASS, wallTabClass = TAB_OFF_CLASS;
    String actionName = ViewContext.RouteData.Values["action"].ToString();
    if (actionName.Equals("stream", StringComparison.CurrentCultureIgnoreCase) ||
        actionName.Equals("index", StringComparison.CurrentCultureIgnoreCase))
        streamTabClass = TAB_ON_CLASS;
    else if (actionName.Equals("albums", StringComparison.CurrentCultureIgnoreCase) ||
        actionName.Equals("album", StringComparison.CurrentCultureIgnoreCase))
        photosTabClass = TAB_ON_CLASS;
    else if (actionName.Equals("friends", StringComparison.CurrentCultureIgnoreCase))
        friendsTabClass = TAB_ON_CLASS;
    else if (actionName.Equals("wall", StringComparison.CurrentCultureIgnoreCase))
        wallTabClass = TAB_ON_CLASS;      
%>
<div class="contentTabs">
    <a href="<%=Url.Action("Stream", "Profile")%>" class="<%=streamTabClass %>">Stream</a>
    <a href="<%=Url.Action("Albums", "Profile")%>" class="<%=photosTabClass %>">Photos</a>
    <a href="<%=Url.Action("Friends", "Profile")%>" class="<%=friendsTabClass %>">Friends</a>
    <a href="<%=Url.Action("Wall", "Profile")%>" class="<%=wallTabClass %>">Wall</a>
</div>